﻿<UserControl x:Class="Export.Ui.Pages.AtpDetailView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
             xmlns:mui="http://firstfloorsoftware.com/ModernUI"
             xmlns:cmd="http://www.galasoft.ch/mvvmlight"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid Style="{StaticResource ContentRoot}">
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"/>
            <RowDefinition Height="215*"/>
        </Grid.RowDefinitions>

        <DataGrid Name="AtpDetailGrid"  ItemsSource="{Binding Atps}" Grid.Row="1" AutoGenerateColumns="False" SelectedItem="{Binding SeletedItem}">
            <DataGrid.Columns>
                <DataGridTextColumn IsReadOnly="True" Binding="{Binding Materialno}"  Header="Mat No."/>
                <DataGridTextColumn IsReadOnly="True" Binding="{Binding Plant}"  Header="Plant"/>
                <DataGridTextColumn IsReadOnly="True" Binding="{Binding ATPQty}"  Header="ATP"/>
                <DataGridTextColumn IsReadOnly="True" Binding="{Binding StorageLocation}"  Header="Location"/>
            </DataGrid.Columns>
            <i:Interaction.Triggers>
                <i:EventTrigger EventName="MouseDoubleClick">
                    <cmd:EventToCommand Command="{Binding CloseCommand}"  />
                </i:EventTrigger>
            </i:Interaction.Triggers>
        </DataGrid>
    </Grid>
</UserControl>
